
	<div class="block">
<div class="invertedshiftdown">
		
		<ul>
			<li class="current"><a href="?page=home">首页</a></li>
			<li><a href="?page=current_user">帐户详情</a></li>
			<li><a href="?page=contact_user">联络其他用户</a></li>
 		</ul>
		<form id="myform">
			<input type="text" class="textinput" /> <input class="submit" type="submit" value="搜索" />
		</form>
	</div>
	<br style="clear: both;" />
	
<div id= 'content'>
	
	<br>

	<dt class="W_bgcolor clearfix">
		<strong>我的资料</strong>
	</dt>
	<dd>
	<ul>
		<li>用户名：<?php echo $currentUser->name;?></li>
		<li>权限：<?php echo $currentUser->getAuthorityName();?></li>
		<li>职位：<?php echo $currentUser->position;?></li>
		<li>帐号：<?php echo $currentUser->id;?></li>

		
	</ul>
	</dd>

	<dt class="W_bgcolor clearfix">
		<strong>客户端情况</strong>
	</dt>
	<dd>
		<ul>
		<script>
		document.write(
		'<li>浏览器：'+browserName+" "+majorVersion+'</li>'
		+'<li>全版本号：'+fullVersion+'</li>'
		+'<li>内核：'+navigator.appName+'</li>'
		+'<li>操作系统：'+OSName+'</li>'
	);
		var latency="";
		jQuery.ajax({
	  type: "POST",
	  url: "api/",
	  	  dataType : 'json',   

	  data: {action: "home_stat",ip:<?php echo "'$currentUser->ip'";?>,os:OSName,browser:browserName+" "+majorVersion,id:<?php echo "'$currentUser->id'";?>},
  	  beforeSend: function ( xhr ) {
 	  latency= new Date();
	}
	  }).done(function ( data ) {
		latency=(new Date())-latency;
	
	   // console.log(latency);
	   // console.log(data['server_latency']);
	   // console.log(data['sql_failure']);
	    var server_latency=Math.round(data['server_latency']*1000);
	    var network_latency=latency-server_latency;
	    $("#content >dd >ul").last().append("<li>服务器响应延时： <meter value='"+server_latency+"' min='0' high='50' max='100'></meter>"+server_latency
	    +"</li><li>网络延时：<meter value='"+network_latency+"' min='0' high='700' max='1000'></meter>"+network_latency+"</li>");
	  		
	  		

	  		if(data['sql_failure']==1){
	  			$("#content").prepend("<div class='isa_error'><h4>服务器数据库异常</h4></div>");

	  		}else{
	  			if(data['error'].length==0){
	  			$("#content").prepend("<div class='isa_success'><h4>用户状况正常</h4></div>");
	  			}else{
	  				var messagebox="<div class='isa_warning'><h4>用户状况异常：("+data['error'].length+")</h4>";
		
					for (var i = 0; i < data['error'].length; i++) {
					messagebox =messagebox+data['error'][i]+"<br>";
					}
					messagebox +="</div>";
					$("#content").prepend(messagebox);
		  		}
	  		}
	  		
	  		//<div class='isa_success'><h4>用户状况正常</h4></div>
	  		$("#content").prepend("	<h2>欢迎使用backoffice</h2>");
	 });


	</script>
	</ul>
	</dd>
<br>

<hr>
</div>
<div class="clear"></div>
	</div>